package com.kingyun.gpsinspection.purificationservice.facade.service.jsm;

import com.kingyun.gpsinspection.purificationservice.facade.model.jsm.Ztree;

import java.util.List;

/**
 * Created by sugongche on 2017/5/12.
 */
public interface OutZtreeService {
    /**
     * 从集合中获取当前节点的祖先节点：不包括当前节点
     * @param currentNode
     * @param ztreeList
     * @param resultZtreeList
     * @return
     */
    void getAncestorNodeList(Ztree currentNode, List<Ztree> ztreeList, List<Ztree> resultZtreeList);

    /**
     * 从集合中获得当前节点的后代节点：不包括当前节点
     * @param currentNode
     * @param ztreeList
     * @param resultZtreeList
     * @return
     */
    void getDescendantNodeList(Ztree currentNode, List<Ztree> ztreeList, List<Ztree> resultZtreeList);

    /**
     * java list去重 http://bbs.csdn.net/topics/390247210
     *
     * 去除重复节点
     * @param list
     */
    void removeDuplicate(List<Ztree> list);
}
